package cn.dliyy.warehouse.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

import cn.dliyy.base.bean.IdEntity;
@Component
@Entity
@Table(name="category")
public class Category extends IdEntity {
	private static final long serialVersionUID = 4227967437483089174L;
	@Column
	private String pid;
	@Column
	@NotEmpty
	@Size(min = 1, max = 10)
	private String name;
	@Column
	@NotEmpty
	@Size(min = 1, max = 10)
	private String code;
	@Column
	@NotEmpty
	@Size(min = 1, max = 10)
	private String pinyin;
	@Column
	private String hasgoods;
	@Column
	@Size(min = 0, max = 20)
	private String note;

	public Category() {
		hasgoods = "0";
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	public String getHasgoods() {
		return hasgoods;
	}

	public void setHasgoods(String hasgoods) {
		this.hasgoods = hasgoods;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

}
